{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "a859db3c",
   "metadata": {},
   "source": [
    "2021-10-26\n",
    "\n",
    "-----------------------------------\n",
    "\n",
    "# 本周学习内容\n",
    "## 1.介绍[github](https://github.com)的相关知识和时间如何在github上面搜索内容\n",
    "## 2.再次尝试[gitee](https://gitte.com)上传文件，并在上传时候写一段文字描述\n",
    ">1. [本周的电子线上讲义](https://gitee.com/xzhichao/interactive-media-production/blob/master/week03/week03_%E5%8F%98%E9%87%8F_%E8%B5%8B%E5%80%BC_%E6%95%B0%E6%8D%AE.ipynb)\n",
    ">2. [线上资源-许老师的博客](https://gitee.com/xzhichao)\n",
    ">3. []"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "29866ccb",
   "metadata": {},
   "source": [
    "## 3.课本项目直接运行（p4）"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "id": "e5282b5c",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Not an odd minute.\n"
     ]
    }
   ],
   "source": [
    "# 1. 课本项目直接运行\n",
    "# 先找到模块，然后从模块中调用一个方法 ： from 模块名字 import 模块方法\n",
    "from datetime import datetime\n",
    "\n",
    "odds = [  1, 3,  5,  7,  9, 11,13,15,17,19,\n",
    "             21,23,25,27,29,31,33,35,37,39,\n",
    "             41,43,45,47,49,51,53,55,57,59]\n",
    "\n",
    "current_localtime_minute = datetime.today().minute # 一直在变化的当前时间的   分钟数\n",
    "\n",
    "if current_localtime_minute in odds:\n",
    "    # if 语句的子程序 会自动空 Tab键的间隔，如果没有空，不符合语法规则\n",
    "    # if 语句子程序不能为空，也就是至少要有一行子程序，如果还不清楚要写的子程序，可以使用\n",
    "    # pass\n",
    "    print(\"This minute seems a little odd.\")\n",
    "else:\n",
    "    print(\"Not an odd minute.\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "id": "4caadfcd",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "140729617689488\n"
     ]
    }
   ],
   "source": [
    "print(id(current_localtime_minute))# 存储地址"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "70ed1d62",
   "metadata": {},
   "source": [
    "## 变量\n",
    ">1. 变量的概念\n",
    ">> - **变量**用于存储在计算机程序中引用和操作的信息。它们还提供了一种用描述性名称标记数据的方法，以便读者和我们自己能够更清楚地理解我们的程序。将变量看作包含信息的容器是有帮助的。它们的唯一目的是在内存中标记和存储数据。然后可以在整个程序中使用这些数据。\n",
    ">2. **变量名称**的规范\n",
    ">>1. 变量名称只可以用**数字、字母和下划线**来定义名称\n",
    ">>2. 数字不可以作为变量名的第一个字符 （stu10001）\n",
    ">>3. 内部（开发团队）已经使用过的名称不可以作为变量名,例如：\n",
    ">>> ['and', 'as', 'assert', 'break', 'class', 'continue', 'def', 'del', 'elif', 'else', 'except', 'exec', 'finally', 'for', 'from', 'global', 'if', 'import', 'in', 'is', 'lambda','not', 'or', 'pass', 'print', 'raise', 'return', 'try', 'while', 'with', 'yield']\n",
    ">>4. 如果你实在想定义一个已经被用过名字：global_zhichao \\ print_zhichao"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "85eabd08",
   "metadata": {},
   "source": [
    "## 赋值\n",
    "\n",
    ">1. 符号（不同于数学概念的“等于”）：=\n",
    ">2. 右侧为值，左侧为赋予的变量"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "id": "990f2672",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "3"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "x = 1\n",
    "y = 2\n",
    "x + y"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "id": "2ba3647e",
   "metadata": {},
   "outputs": [
    {
     "ename": "NameError",
     "evalue": "name 'z' is not defined",
     "output_type": "error",
     "traceback": [
      "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[1;31mNameError\u001b[0m                                 Traceback (most recent call last)",
      "\u001b[1;32m<ipython-input-8-3a710d2a84f8>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m\u001b[0m\n\u001b[1;32m----> 1\u001b[1;33m \u001b[0mz\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m",
      "\u001b[1;31mNameError\u001b[0m: name 'z' is not defined"
     ]
    }
   ],
   "source": [
    "z"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "id": "51bee644",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "李华\n",
      "李华\n",
      "小红\n",
      "李华\n"
     ]
    }
   ],
   "source": [
    "name_01 = \"李华\"\n",
    "name_02 = name_01\n",
    "# 变量“名”不会进行信息交换，我们只是交换或传递变量的内容\n",
    "print(name_01)\n",
    "print(name_02)\n",
    "\n",
    "name_01 = \"小红\"\n",
    "# 变量：可以改变的值，赋值是改变的常用手段\n",
    "# python是解释性语言，是一行一行执行的，没有特定的要求，是不会重复运行上一行代码的。\n",
    "print(name_01)\n",
    "print(name_02)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "29dda889",
   "metadata": {},
   "source": [
    "## 基本的数据结构\n",
    "\n",
    "> 1. 字符串（strings）\n",
    ">> 1. [基本概念](https://docs.python.org/3/tutorial/introduction.html#strings)\n",
    ">>> * Besides numbers, Python can also manipulate strings, which can be expressed in several ways. They can be enclosed in single quotes ('...') or double quotes (\"...\") with the same result 2. \\ can be used to escape quotes:\n",
    "\n",
    "```\n",
    ">>> 'spam eggs'  # single quotes\n",
    "'spam eggs'\n",
    ">>> 'doesn\\'t'  # use \\' to escape the single quote...\n",
    "\"doesn't\"\n",
    ">>> \"doesn't\"  # ...or use double quotes instead\n",
    "\"doesn't\"\n",
    ">>> '\"Yes,\" they said.'\n",
    "'\"Yes,\" they said.'\n",
    ">>> \"\\\"Yes,\\\" they said.\"\n",
    "'\"Yes,\" they said.'\n",
    ">>> '\"Isn\\'t,\" they said.'\n",
    "'\"Isn\\'t,\" they said.'\n",
    "\n",
    "```\n",
    ">> 2. [基本方法](https://docs.python.org/3/library/stdtypes.html#sequence-types-list-tuple-range)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "id": "892290e5",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "\"doesn't\""
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# SyntaxError: invalid syntax 语法错误，主要形式：符号没有用英文，或者python语法写错\n",
    "\"doesn't\""
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "id": "ee39ac09",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "\"doesn't\""
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# \\ 用来转义的，后面的符号将作为符号\n",
    "'doesn\\'t'"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "id": "fc43d287",
   "metadata": {},
   "outputs": [],
   "source": [
    "# 三引号的优势：存较为复杂格式的字符串，不改变其样式\n",
    "\n",
    "python_str = '''\n",
    ">>> 'spam eggs'  # single quotes\n",
    "'spam eggs'\n",
    ">>> 'doesn\\'t'  # use \\' to escape the single quote...\n",
    "\"doesn't\"\n",
    ">>> \"doesn't\"  # ...or use double quotes instead\n",
    "\"doesn't\"\n",
    ">>> '\"Yes,\" they said.'\n",
    "'\"Yes,\" they said.'\n",
    ">>> \"\\\"Yes,\\\" they said.\"\n",
    "'\"Yes,\" they said.'\n",
    ">>> '\"Isn\\'t,\" they said.'\n",
    "'\"Isn\\'t,\" they said.'\n",
    "'''"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "id": "d95b4f03",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      ">>> 'spam eggs'  # single quotes\n",
      "'spam eggs'\n",
      ">>> 'doesn't'  # use ' to escape the single quote...\n",
      "\"doesn't\"\n",
      ">>> \"doesn't\"  # ...or use double quotes instead\n",
      "\"doesn't\"\n",
      ">>> '\"Yes,\" they said.'\n",
      "'\"Yes,\" they said.'\n",
      ">>> \"\"Yes,\" they said.\"\n",
      "'\"Yes,\" they said.'\n",
      ">>> '\"Isn't,\" they said.'\n",
      "'\"Isn't,\" they said.'\n",
      "\n"
     ]
    }
   ],
   "source": [
    "print(python_str)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "8ca27c05",
   "metadata": {},
   "outputs": [],
   "source": [
    "# 假如我们想在python的变量中存 HTML语言(其他的语言)，就可以用\"\"\" ... \"\"\"\n",
    "zhichao_blogs_html = \"\"\"\n",
    "<div class=\"day\">\n",
    "    <div class=\"dayTitle\">\n",
    "        <a href=\"https://www.cnblogs.com/xuzhichao/archive/2019/12/09.html\">2019年12月9日</a>\n",
    "    </div>\n",
    "\n",
    "        <div class=\"postTitle\">\n",
    "            \n",
    "\n",
    "<a class=\"postTitle2 vertical-middle\" href=\"https://www.cnblogs.com/xuzhichao/p/12008790.html\">\n",
    "    <span>\n",
    "        Python之路，Day06-类\n",
    "    </span>\n",
    "    \n",
    "\n",
    "\n",
    "\n",
    "</a>\n",
    "\n",
    "        </div>\n",
    "        <div class=\"postCon\">\n",
    "\n",
    "    <div class=\"c_b_p_desc\">\n",
    "摘要：            \n",
    "本节内容 1. 面向对象介绍（面向过程&面向对象） 2. 面向对象特性 3.类、方法 1.面向对象介绍 引子： 你现在是一家游戏公司的开发人员，需要你开发一款（”吃鸡“）游戏，你需要思考，至少要有两个角色，一个是人，一个是枪 并且人和装备都有不同的技能，比如人可以跑、走、蹲等，枪可以装子弹，射击等，        <a href=\"https://www.cnblogs.com/xuzhichao/p/12008790.html\" class=\"c_b_p_desc_readmore\">阅读全文</a>\n",
    "    </div>\n",
    "</div>\n",
    "        <div class=\"clear\"></div>\n",
    "        <div class=\"postDesc\">posted @ 2019-12-09 00:35\n",
    "智超(Zhichao)\n",
    "<span data-post-id=\"12008790\" class=\"post-view-count\">阅读(608)</span> \n",
    "<span data-post-id=\"12008790\" class=\"post-comment-count\">评论(0)</span> \n",
    "<span data-post-id=\"12008790\" class=\"post-digg-count\">推荐(1)</span> \n",
    "<a href=\"https://i.cnblogs.com/EditPosts.aspx?postid=12008790\" rel=\"nofollow\">\n",
    "    编辑\n",
    "</a>\n",
    "</div>\n",
    "        <div class=\"clear\"></div>\n",
    "</div>\n",
    "\"\"\""
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "b1f438a8",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "<div class=\"day\">\n",
      "    <div class=\"dayTitle\">\n",
      "        <a href=\"https://www.cnblogs.com/xuzhichao/archive/2019/12/09.html\">2019年12月9日</a>\n",
      "    </div>\n",
      "\n",
      "        <div class=\"postTitle\">\n",
      "            \n",
      "\n",
      "<a class=\"postTitle2 vertical-middle\" href=\"https://www.cnblogs.com/xuzhichao/p/12008790.html\">\n",
      "    <span>\n",
      "        Python之路，Day06-类\n",
      "    </span>\n",
      "    \n",
      "\n",
      "\n",
      "\n",
      "</a>\n",
      "\n",
      "        </div>\n",
      "        <div class=\"postCon\">\n",
      "\n",
      "    <div class=\"c_b_p_desc\">\n",
      "摘要：            \n",
      "本节内容 1. 面向对象介绍（面向过程&面向对象） 2. 面向对象特性 3.类、方法 1.面向对象介绍 引子： 你现在是一家游戏公司的开发人员，需要你开发一款（”吃鸡“）游戏，你需要思考，至少要有两个角色，一个是人，一个是枪 并且人和装备都有不同的技能，比如人可以跑、走、蹲等，枪可以装子弹，射击等，        <a href=\"https://www.cnblogs.com/xuzhichao/p/12008790.html\" class=\"c_b_p_desc_readmore\">阅读全文</a>\n",
      "    </div>\n",
      "</div>\n",
      "        <div class=\"clear\"></div>\n",
      "        <div class=\"postDesc\">posted @ 2019-12-09 00:35\n",
      "智超(Zhichao)\n",
      "<span data-post-id=\"12008790\" class=\"post-view-count\">阅读(608)</span> \n",
      "<span data-post-id=\"12008790\" class=\"post-comment-count\">评论(0)</span> \n",
      "<span data-post-id=\"12008790\" class=\"post-digg-count\">推荐(1)</span> \n",
      "<a href=\"https://i.cnblogs.com/EditPosts.aspx?postid=12008790\" rel=\"nofollow\">\n",
      "    编辑\n",
      "</a>\n",
      "</div>\n",
      "        <div class=\"clear\"></div>\n",
      "</div>\n",
      "\n"
     ]
    }
   ],
   "source": [
    "print(zhichao_blogs_html)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "2790b5a5",
   "metadata": {},
   "source": [
    "# 字符串的拼接\n",
    "* 字符串可以用+运算符连接（粘合在一起）：+"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "id": "6e1f0273",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'Li Hua'"
      ]
     },
     "execution_count": 27,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "first_name = \"Li\"\n",
    "last_name = \"Hua\"\n",
    "name = first_name + ' '+ last_name\n",
    "name"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 34,
   "id": "44b0968c",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'Li'"
      ]
     },
     "execution_count": 34,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "name[0:2]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "id": "fddd8c05",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'Python'"
      ]
     },
     "execution_count": 25,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "'Py''thon'"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "82019826",
   "metadata": {},
   "source": [
    "* 字符串可以被索引index（下标），第一个字符的索引为0.没有单独的字符类型；一个字符只是一个大小为1的字符串："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "id": "c95f60f7",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "L\n",
      "i\n",
      " \n"
     ]
    }
   ],
   "source": [
    "print(name[0])\n",
    "print(name[1])\n",
    "print(name[2])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "id": "a3f73e00",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'Li'"
      ]
     },
     "execution_count": 29,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "name[0]+name[1]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "be7c1f9a",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'interactive-media-production'"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 练习:取出\"interactive-media-production\"中的\"media\"\n",
    "course_name = \"interactive-media-production\"\n",
    "course_name"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "3f975840",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'media'"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 一个一个值的取值方式叫做：index（索引）\n",
    "course_name[12]+course_name[13]+course_name[14]+course_name[15]+course_name[16]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "f0772c6c",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'media'"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 一次性取值的方法：slice（切片）取左（闭区间）不取右（开区间）\n",
    "course_name[12:17]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "id": "ddfd1876",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "+---+---+---+---+---+---+\n",
      " | P | y | t | h | o | n |\n",
      " +---+---+---+---+---+---+\n",
      " 0   1   2   3   4   5   6\n",
      "-6  -5  -4  -3  -2  -1\n",
      "\n"
     ]
    }
   ],
   "source": [
    "print('''\n",
    "+---+---+---+---+---+---+\n",
    " | P | y | t | h | o | n |\n",
    " +---+---+---+---+---+---+\n",
    " 0   1   2   3   4   5   6\n",
    "-6  -5  -4  -3  -2  -1\n",
    "''')"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "2b15ffe5",
   "metadata": {},
   "source": [
    "## 数值（numbers）\n",
    "\n",
    "* 用来运算的\n",
    "\n",
    ">1. [数值概念](https://docs.python.org/3/tutorial/introduction.html#numbers)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 36,
   "id": "1ca51ae6",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "16"
      ]
     },
     "execution_count": 36,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "9+7"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 37,
   "id": "6e069685",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "177777"
      ]
     },
     "execution_count": 37,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "123456+54321"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 38,
   "id": "0508bb39",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "18360540"
      ]
     },
     "execution_count": 38,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "12645*1452"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 39,
   "id": "78b73c93",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "1628413597910449"
      ]
     },
     "execution_count": 39,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "343**6"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "d852292c",
   "metadata": {},
   "source": [
    "### 数值的类型\n",
    "> 1. 整数（int）\n",
    "> 2.浮点数（float）\n",
    "> 3. 复数（complex）"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 40,
   "id": "fe20f202",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "210"
      ]
     },
     "execution_count": 40,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "210"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 41,
   "id": "1d37c38a",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<class 'int'>\n"
     ]
    }
   ],
   "source": [
    "print(type(210))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 43,
   "id": "9dec1e35",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "3.1415926"
      ]
     },
     "execution_count": 43,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "3.1415926"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 44,
   "id": "af4edef6",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<class 'float'>\n"
     ]
    }
   ],
   "source": [
    "print(type(3.1415926))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 46,
   "id": "1ab1f49e",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(3+4j)"
      ]
     },
     "execution_count": 46,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "3+4j"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 48,
   "id": "6a04f6bd",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<class 'complex'>\n"
     ]
    }
   ],
   "source": [
    "print(type(3+4j))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 49,
   "id": "7327dcae",
   "metadata": {},
   "outputs": [],
   "source": [
    "# 运算符的所有的 内容 "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "id": "36354338",
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "id": "d3e9c3ee",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Operation</th>\n",
       "      <th>Result</th>\n",
       "      <th>Notes</th>\n",
       "      <th>Full documentation</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>x + y</td>\n",
       "      <td>sum of x and y</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>x - y</td>\n",
       "      <td>difference of x and y</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>x * y</td>\n",
       "      <td>product of x and y</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>x / y</td>\n",
       "      <td>quotient of x and y</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>x // y</td>\n",
       "      <td>floored quotient of x and y</td>\n",
       "      <td>(1)</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>x % y</td>\n",
       "      <td>remainder of x / y</td>\n",
       "      <td>(2)</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>-x</td>\n",
       "      <td>x negated</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>+x</td>\n",
       "      <td>x unchanged</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>abs(x)</td>\n",
       "      <td>absolute value or magnitude of x</td>\n",
       "      <td>NaN</td>\n",
       "      <td>abs()</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>int(x)</td>\n",
       "      <td>x converted to integer</td>\n",
       "      <td>(3)(6)</td>\n",
       "      <td>int()</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>float(x)</td>\n",
       "      <td>x converted to floating point</td>\n",
       "      <td>(4)(6)</td>\n",
       "      <td>float()</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>complex(re, im)</td>\n",
       "      <td>a complex number with real part re, imaginary ...</td>\n",
       "      <td>(6)</td>\n",
       "      <td>complex()</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>c.conjugate()</td>\n",
       "      <td>conjugate of the complex number c</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>divmod(x, y)</td>\n",
       "      <td>the pair (x // y, x % y)</td>\n",
       "      <td>(2)</td>\n",
       "      <td>divmod()</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>pow(x, y)</td>\n",
       "      <td>x to the power y</td>\n",
       "      <td>(5)</td>\n",
       "      <td>pow()</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>x ** y</td>\n",
       "      <td>x to the power y</td>\n",
       "      <td>(5)</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "          Operation                                             Result  \\\n",
       "0             x + y                                     sum of x and y   \n",
       "1             x - y                              difference of x and y   \n",
       "2             x * y                                 product of x and y   \n",
       "3             x / y                                quotient of x and y   \n",
       "4            x // y                        floored quotient of x and y   \n",
       "5             x % y                                 remainder of x / y   \n",
       "6                -x                                          x negated   \n",
       "7                +x                                        x unchanged   \n",
       "8            abs(x)                   absolute value or magnitude of x   \n",
       "9            int(x)                             x converted to integer   \n",
       "10         float(x)                      x converted to floating point   \n",
       "11  complex(re, im)  a complex number with real part re, imaginary ...   \n",
       "12    c.conjugate()                  conjugate of the complex number c   \n",
       "13     divmod(x, y)                           the pair (x // y, x % y)   \n",
       "14        pow(x, y)                                   x to the power y   \n",
       "15           x ** y                                   x to the power y   \n",
       "\n",
       "     Notes Full documentation  \n",
       "0      NaN                NaN  \n",
       "1      NaN                NaN  \n",
       "2      NaN                NaN  \n",
       "3      NaN                NaN  \n",
       "4      (1)                NaN  \n",
       "5      (2)                NaN  \n",
       "6      NaN                NaN  \n",
       "7      NaN                NaN  \n",
       "8      NaN              abs()  \n",
       "9   (3)(6)              int()  \n",
       "10  (4)(6)            float()  \n",
       "11     (6)          complex()  \n",
       "12     NaN                NaN  \n",
       "13     (2)           divmod()  \n",
       "14     (5)              pow()  \n",
       "15     (5)                NaN  "
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 运算符的所有的 内容 \n",
    "pd.read_html('https://docs.python.org/3/library/stdtypes.html#numeric-types-int-float-complex')[2]"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.8"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
